home *** CD-ROM | disk | FTP | other *** search
-
- ÃP4ô > MiniDumpFN : A self-contained function.
- ÃZ.Ý ¤minidump(margin%,threshold%,printmode%)
- Ãd'ô BASIC version 2.0 : 26th Oct 1987
- Ãn)ô Copyright : ABACUS TRAINING
- Ãx:
- ÃŵJê left%,bottom%,right%,top%,xorigin%,yorigin%,xconvert%,yconvert%,vdu%
- Ã…Iê line%,x%,horizpsn%,y%,points%,pixel%,printcode%,dot%,xstep%,colour%
- Äê Ŷ
- Ã /î Ŷ ÿ("FX 3,0"):ï 26,12:ö:ñ " at line ";fi:ú
- ê
- Þ vdu% 39
- ôDç margin%<0 ☓ margin%>79 … = "margin% must be between 0 and 79."
- þJç threshold%<0 ☓ threshold%>255 … = "keep threshold% between 0 & 255."
- ÃÈHç printmode%=5 ☓ printmode%=7 ⇧ ="printmode% must be either 5 or 7."
- ÃÒ !(vdu%+ 0)=131 :ô top%
- ÃÜ!!(vdu%+ 4)=128 :ô left%
- Ãæ"!(vdu%+ 8)=130 :ô right%
- Ãð#!(vdu%+12)=129 :ô bottom%
- Ãú$!(vdu%+16)=136 :ô xorigin%
- Ä$!(vdu%+20)=137 :ô yorigin%
- Ä%!(vdu%+24)= 4 :ô xconvert%
- Ä%!(vdu%+28)= 5 :ô yconvert%
- Ä"3!(vdu%+32)= -1 :ô End of parameter block.
- Ä,&È− "OS_ReadVduVariables",vdu%,vdu%
- Ä6top% =!(vdu%+ 0)
- Ä@left% =!(vdu%+ 4)
- ÄJright% =!(vdu%+ 8)
- ÄTbottom% =!(vdu%+12)
- Ä^xorigin% =!(vdu%+16)
- Ähyorigin% =!(vdu%+20)
- Ärxconvert% =!(vdu%+24)
- Ä|yconvert% =!(vdu%+28)
- Äŷ:
- Ä‘:
- ÄŒHleft% = (left%<<xconvert%)-xorigin% :ô These are the screen
- ĤGright% = ((right%+1)<<xconvert%)-xorigin%-1 :ô co-ordinates of the
- Ä®Hbottom%= (bottom%<<yconvert%)-yorigin% :ô the graphics window.
- ĸ3top% = ((top%+1)<<yconvert%)-yorigin%-1 :ô
- ÄÂline%=top%
- ÄÌ:
- ÄÖ:
- ÄàFxstep%=(9-printmode%)>>1 :ô xstep%=1 or 2 for printmode%=7 or 5.
- Äê:
- Äô:
- Äþ%ô *FX 3,10 sends to printer only.
- Å*FX 3,10
- Å/ï 27,64 :ô Initialise the printer.
- Å=ï 27,65,8 :ô 8/72" line spacing = 8 dots per line.
- Å&/ï 27,108,margin% :ô Left margin is margin%.
- Å0Hpoints%=((right%-left%)>>xstep%)+1 : ô No. of printed dots per line.
- Å:>xstep%=xstep%<<1 :ô xstep%=2 or 4 for printmode%=7 or 5.
- ÅD:
- ÅNõ
- ÅXEï 27,42,(9-xstep%),points%◰&100,points%Ŵ&100 :ô Set printer mode.
- Åb;horizpsn%=left% :ô Scan screen from left to right.
- Ålõ
- ÅvDprintcode%=0 :ô Initialise the code sent to the printer.
- Å€Bpixel%=7 :ô Pixels are scanned from top to bottom.
- Å⇩õ
- œx%=horizpsn%
- Åfiy%=line%-28+(pixel%<<2)
- Ũ?colour%=°x%,y%) :ô Read the colour of the point at (x%,y%).
- Ų*ç colour%>threshold% … dot%=1 ⇧ dot%=0
- ż9printcode%+=(dot%<<pixel%) :ô Add "dot" to printcode.
- ÅÆ=pixel%-=1 :ô Decrement the pixel loop counter.
- ÅÐ<ý pixel%<0 :ô 8 pixels make 1 strike of printhead.
- ÅÚ9ï printcode% :ô Send one strike to the printer.
- ÅäHhorizpsn%+=xstep% :ô Increment the horizontal position by xstep%.
- Åîý horizpsn%>right%
- Åø5ï 13,10 :ô Carriage return, line feed.
- Æ<line%-=32 :ô Decrement the line loop counter.
- Æý line%<bottom%
- Æ0ï 12 :ô Form feed the printer.
- Æ ,ï 27,64 :ô Reset the printer.
- Æ*.ô *FX 3,0 sends output to the screen only.
- Æ4*FX 3,0
- Æ> ="OK"
- ÆH:
- ÆR:
- Æ\:
- Æf:
- ÿ